package com.minglead.springboot.platform.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.minglead.springboot.common.persistence.TreeDao;
import com.minglead.springboot.common.crud.annotation.MyBatisDao;
import com.minglead.springboot.platform.sys.entity.Area;

/**
 * 区域DAO接口
 */
@MyBatisDao
public interface AreaDao extends TreeDao<Area> {
	/**
	 * 根据区域代码获取下级区域列表
	 * @param code
	 * @return
	 */
	public List<Area> getSubListByCode(@Param("code")String code);

	public Area getEntityByCode(@Param("code")String code);
	
	public List<Area> getSubListByParentId(@Param("parentId")String parentId);

	/**
	 * 获取根节点
	 * @return
	 */
	public Area getRoot();
	
	public List<Area> getTreeLevelsList(@Param("id")String id);
	
	public Area getTreeLevelsListByType(@Param("id")String id,@Param("type")String type);
	
}
